package com.yunyao.framework.service;

import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.common.dto.DeptTreeDto;
import com.yunyao.framework.dto.dept.DeptDeleteDto;
import com.yunyao.framework.dto.dept.DeptSaveDto;
import com.yunyao.framework.dto.dept.DeptUpdateDto;
import com.yunyao.framework.vo.dept.DeptTreeVO;
import com.yunyao.framework.vo.dept.DeptVO;

import java.util.List;

/**
 * @author xingjishuai
 * @date 2024-07-16
 */
public interface DeptService {
    /**
     * 部门树
     * @param deptTreeDto
     * @return
     */
    YResult<List<DeptTreeVO>> treeList(DeptTreeDto deptTreeDto);

    /**
     * 部门列表
     * @param deptTreeDto
     * @return
     */
    YResult<PageResult<DeptVO>> pageList(DeptTreeDto deptTreeDto);

    YResult<DeptVO> getDetailInfo(DeptTreeDto deptTreeDto);

    YResult<String> add(DeptSaveDto saveDto);

    YResult<String> update(DeptUpdateDto updateDto);

    YResult<String> delete(DeptDeleteDto deleteDto);

    YResult<String> sync();
}
